import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
	/**
	 * mapState ==>> computed
	 */
	
	state: {
		yangliu: 222,

	},
	/**
	 * mapMutations ==>> methods
	 * 异步操作
	 */

	mutations: {
		add(state, step) {
			state.yangliu += step
		},
		jian(state, step) {
			state.yangliu -= step
		},
	},
	/**
	 * mapActions ==> methods
	 */
	actions: {}
})
export default store
